﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <LinearGradientBrush x:Key="TitleBarBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#E7EBF7" Offset="0.0"/>
        <GradientStop Color="#CEE3FF" Offset="0.5"/>
        <GradientStop Color="#DEF7FF" Offset="1.0"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="StatusItemBackgoundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#C5DCF8 " Offset="0.0"/>
        <GradientStop Color="#7495C2" Offset="1.0"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ProgressBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#A4DF47 " Offset="0.0"/>
                <GradientStop Color="#71AE1E" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ProgressBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#C6CBD5" Offset="0.0"/>
                <GradientStop Color="#E0E4ED" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>




    <LinearGradientBrush x:Key="StatusBackgoundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#D7E6F9 " Offset="0.0"/>
                <GradientStop Color="#B6D1F5" Offset="0.5"/>
                <GradientStop Color="#D7E5F7" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="GripAreadBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#C6DFFF" Offset="0.0"/>
                <GradientStop Color="#7396C6" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="BorderBrush" Color="#6593CF" />
    <SolidColorBrush x:Key="TabTextBrush" Color="#4971A3" />
    <LinearGradientBrush x:Key="NormalBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#E1EAF5"/>
        <GradientStop Offset="0.2" Color="#D1DFF0"/>
        <GradientStop Offset="0.2" Color="#C7D8ED"/>
        <GradientStop Offset="1.0" Color="#E7F2FF"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="PressedBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#FED8AA"/>
        <GradientStop Offset="0.4" Color="#FBB565"/>
        <GradientStop Offset="0.4" Color="#FA9D34"/>
        <GradientStop Offset="1.0" Color="#FDEEAA"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="HighlightBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#FFFEE3"/>
        <GradientStop Offset="0.4" Color="#FFE797"/>
        <GradientStop Offset="0.4" Color="#FFD750"/>
        <GradientStop Offset="1.0" Color="#FFE796"/>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="NormalForegroundBrush" Color="#15428B"/>
    <SolidColorBrush x:Key="NormalBorderBrush" Color="#8DB2E3"/>
    <SolidColorBrush x:Key="PressedBorderBrush" Color="#ABA18C"/>

    <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888"/>
    <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE"/>
    <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA"/>

    <SolidColorBrush x:Key="GroupBoxOuterBorderBrush" Color="#C5D2DF"/>
    <SolidColorBrush x:Key="GroupBoxHighlightBackgroundBrush" Color="#FFFCFFBF"/>
    <SolidColorBrush x:Key="GroupBoxHighlightForegroundBrush" Color="#3E6AC8"/>
    <SolidColorBrush x:Key="GroupBoxInnerBorderBrush" Color="#EDF2F8"/>
    <SolidColorBrush x:Key="TabItemBackgroundBrush" Color="#E1EAF5"/>

    <LinearGradientBrush x:Key="ToolTipBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" Color="#FFFFFF"/>
        <GradientStop Offset="0.2" Color="#FCFDFE"/>
        <GradientStop Offset="0.6" Color="#E6EDF7"/>
        <GradientStop Offset="1" Color="#CBDAEF"/>
    </LinearGradientBrush>

    <Style x:Key="TabItemStyle" TargetType="TabItem">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="UIElement.SnapsToDevicePixels" Value="True"/>
        <Setter Property="TextElement.Foreground" Value="{StaticResource NormalForegroundBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Border 
                  Padding="3,2,3,5"
                  Name="border"
                  SnapsToDevicePixels="True"
                  Margin="2,0,2,-1"
                  BorderThickness="1,1,1,0" 
                  CornerRadius="3,3,0,0"
                  >
                        <ContentPresenter Grid.Column="1" x:Name="ContentSite"
                     VerticalAlignment="Center"
                     HorizontalAlignment="Center"
                     ContentSource="Header"
                     Margin="7,2,12,2"                    
                     RecognizesAccessKey="True" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Panel.ZIndex" Value="1000"/>
                            <Setter TargetName="border" Property="Background" Value="{StaticResource TabItemBackgroundBrush}"/>
                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource NormalBorderBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}"/>
                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}"/>
                            <Setter TargetName="border" Property="BorderThickness" Value="1,1,1,0" />
                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="False"/>
                                <Condition Property="IsMouseOver" Value="True"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Background" TargetName="border" Value="{StaticResource HighlightBackgroundBrush}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource PressedBorderBrush}"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--Style for the tab in the ribbon.-->
    <Style x:Key="TabControlSyle" TargetType="TabControl">
        <Setter Property="UIElement.SnapsToDevicePixels" Value="True"/>
        <Setter Property="TextElement.Foreground" Value="{StaticResource NormalForegroundBrush}"/>
        <Setter Property="Control.Padding" Value="4,8,4,4"/>
        <Setter Property="Border.BorderBrush" Value="{StaticResource NormalBorderBrush}"/>
        <Setter Property="Border.Background" Value="{StaticResource NormalBackgroundBrush}"/>
        <Setter Property="Control.HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Control.VerticalContentAlignment" Value="Center"/>
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid
              ClipToBounds="True"
              SnapsToDevicePixels="True"
              KeyboardNavigation.TabNavigation="Local">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <TabPanel
                Margin="4,4,4,0"
                IsItemsHost="True"
                Name="HeaderPanel"
                Panel.ZIndex="1"
                KeyboardNavigation.TabIndex="1"
                Grid.Column="0"
                Grid.Row="0" />
                        <Border
                SnapsToDevicePixels="True"
                Background="{StaticResource NormalBackgroundBrush}" 
                BorderBrush="{StaticResource NormalBorderBrush}"
                BorderThickness="1" 
                Name="ContentPanel"
                CornerRadius="3" 
                KeyboardNavigation.TabIndex="2"
                KeyboardNavigation.TabNavigation="Local"
                KeyboardNavigation.DirectionalNavigation="Contained"
                Grid.Column="0"
                Grid.Row="1">
                            <ContentPresenter
                      ContentSource="SelectedContent"
                      Margin="{TemplateBinding Control.Padding}"
                      Name="PART_SelectedContentHost"
                      SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
                      ContentTemplate="{TemplateBinding TabControl.SelectedContentTemplate}"
                      Content="{TemplateBinding TabControl.SelectedContent}" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="UIElement.IsEnabled" Value="False">
                            <Setter Property="TextElement.Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="SplitButtonFromComboBox" TargetType="{x:Type ComboBox}"/>
    <SolidColorBrush x:Key="InactiveBorderBrush" Color="#FFCECECE"/>
    <Style x:Key="SplitButtonRight" BasedOn="{x:Null}" TargetType="{x:Type Button}">
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="{x:Type Button}">
    				<Grid x:Name="LayoutRoot" Background="{x:Null}">
    					<Rectangle HorizontalAlignment="Stretch" Margin="0,0,0,0" Width="Auto" Fill="{DynamicResource NormalBackgroundBrush}" StrokeThickness="1" RadiusX="2" RadiusY="2" x:Name="rectangle" Stroke="{DynamicResource InactiveBorderBrush}"/>
    					<Rectangle HorizontalAlignment="Right" Margin="0,0,0,0" Width="10" Fill="{DynamicResource NormalBackgroundBrush}" Stroke="{DynamicResource DisabledBackgroundBrush}" RadiusX="0" RadiusY="0" StrokeThickness="0" x:Name="rectangle1"/>
    					<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" Margin="4,2,4,2"/>
    					<Border HorizontalAlignment="Right" Margin="0,0,0,0" Width="10" BorderThickness="0,1,0,1" BorderBrush="{DynamicResource InactiveBorderBrush}" x:Name="border"/>
    				</Grid>
    				<ControlTemplate.Triggers>
    					<Trigger Property="IsFocused" Value="True"/>
    					<Trigger Property="IsDefaulted" Value="True"/>
    					<MultiTrigger>
    						<MultiTrigger.Conditions>
    							<Condition Property="IsMouseOver" Value="True"/>
    						</MultiTrigger.Conditions>
    						<Setter Property="Fill" TargetName="rectangle" Value="{DynamicResource HighlightBackgroundBrush}"/>
    						<Setter Property="Fill" TargetName="rectangle1" Value="{DynamicResource HighlightBackgroundBrush}"/>
    						<Setter Property="Stroke" TargetName="rectangle" Value="{DynamicResource BorderBrush}"/>
    						<Setter Property="BorderThickness" TargetName="border" Value="0,1,1,1"/>
    						<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource BorderBrush}"/>
    					</MultiTrigger>
    					<Trigger Property="IsPressed" Value="True">
    						<Setter Property="Fill" TargetName="rectangle1" Value="{DynamicResource PressedBackgroundBrush}"/>
    						<Setter Property="Fill" TargetName="rectangle" Value="{DynamicResource PressedBackgroundBrush}"/>
    						<Setter Property="Stroke" TargetName="rectangle1" Value="{DynamicResource NormalBorderBrush}"/>
    						<Setter Property="BorderThickness" TargetName="border" Value="0,1,1,1"/>
    						<Setter Property="Stroke" TargetName="rectangle" Value="{DynamicResource BorderBrush}"/>
    						<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource BorderBrush}"/>
    					</Trigger>
    					<Trigger Property="IsEnabled" Value="False"/>
    				</ControlTemplate.Triggers>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
</ResourceDictionary>
